package com.scm.java.net.sup.action;

import java.util.Date;
import java.util.List;

import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;
import com.scm.entity.base.SupDrugStock;
import com.scm.entity.base.Supplier;
import com.scm.java.net.system.action.BasicAction;
/**
 * 入库单查询action
 * @author Administrator
 *
 */
public class DrugStockAction extends BasicAction implements ModelDriven<SupDrugStock>,Preparable{
    private SupDrugStock stock;
	// 供应商列表
	private List<Supplier> supLists;
	public String list() throws Exception{
		// 查找所有的供应商
		supLists = dao.queryList("supplier.getSupplier", null);
    	stock.setProductionDate(new Date());
    	stock.setStatus(0);
    	paginatedQuery("drugin.getStocks");
    	return "list";
    }
	@Override
	public SupDrugStock getModel() {
		// TODO Auto-generated method stub
		return stock;
	}
	public List<Supplier> getSupLists() {
		return supLists;
	}
	public void setSupLists(List<Supplier> supLists) {
		this.supLists = supLists;
	}
	public SupDrugStock getStock() {
		return stock;
	}
	public void setStock(SupDrugStock stock) {
		this.stock = stock;
	}
	@Override
	public void prepare() throws Exception {
		// TODO Auto-generated method stub
		stock=new SupDrugStock();
	}
}
